var e = getApp();

Page({
    data: {
        customer_open: !0,
        show1: !1,
        dataget: [],
        title: [],
        msgarr: [],
        msg: "",
        showbox: !1,
        service_QRcode: "",
        service_mobile: ""
    },
    onLoad: function(e) {
        this.init(), this._getData();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    init: function() {
        this.setData({
            customer_open: !0,
            show1: !1,
            service_QRcode: "",
            service_mobile: ""
        });
    },
    callPhone: function() {
        wx.makePhoneCall({
            phoneNumber: this.data.service_mobile
        });
    },
    showPop: function() {
        this.data.customer_open && this.setData({
            show1: !0
        });
    },
    closePop: function() {
        this.setData({
            show1: !1
        });
    },
    _getData: function() {
        var t = this, o = e.getNetAddresss("plugin.help-center.api.content.info");
        e._getNetWork({
            url: o,
            success: function(e) {
                var o = e.data;
                if (1 == o.result) {
                    console.log(o.data.customer_service.customer_open), t.setData({
                        dataget: o.data.set_data,
                        customer_open: "1" == o.data.customer_service.customer_open,
                        cservice: o.data.customer_service.cservice,
                        service_QRcode: o.data.customer_service.service_QRcode,
                        service_mobile: o.data.customer_service.service_mobile
                    });
                    var s = t.data.msgarr, a = t.data.title;
                    t.data.dataget.map(function(e) {
                        a.push(e.title), s.push(e.content);
                    }), t.setData({
                        title: a,
                        msgarr: s,
                        msg: s[0]
                    });
                } else wx.showToast({
                    icon: "none",
                    title: o.msg,
                    duration: 1500
                });
            }
        });
    },
    showTap: function(e) {
        var t = e.currentTarget.dataset.index;
        console.log(e), this.setData({
            msginfo: this.data.msgarr[t],
            showbox: !0
        }), console.log(this.data.msgarr, t);
    },
    msgboxclose: function() {
        this.setData({
            showbox: !1,
            msg: ""
        });
    }
});